﻿//-----------------------------------------------------------------------
// <copyright file="IProcessingServerContract.cs" company="FastNET Services">
//     Copyright (c) 2008-2009. All Rights Reserved.
// </copyright>
// <license>
//     GPLv2
// </license>
// <warranty>
//     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
//     BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
//     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
//     DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
//     OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
// </warranty>
//-----------------------------------------------------------------------
#region Usings
using System.ServiceModel;
using FastNET.CleanAct.Common.Contracts.DataContracts.Requests;
using FastNET.CleanAct.Common.Contracts.DataContracts.Responses;
#endregion

namespace FastNET.CleanAct.Common.Contracts.ServiceContracts
{
    /// <summary>
    /// Interface used for communicating with the server system
    /// </summary>
    [ServiceContract(Namespace = "http://cleanact.codeplex.com/ServiceContracts/2009/06/IProcessingServerContract",
        SessionMode = SessionMode.Allowed, Name = "IProcessingServerContract", ConfigurationName = "IProcessingServerContract", CallbackContract = typeof(IClientEngineContract))]
    public interface IProcessingServerContract
    {
        /// <summary>
        /// Operation for retrieving a list of all schedules matching this client
        /// </summary>
        /// <returns>A <see cref="ResponseScheduleDataContract"/> with the response information</returns>
        [OperationContract(Action = "requestRetrieveSchedules", ReplyAction = "responseRetrieveSchedules", Name = "retrieveSchedules")]
        ResponseScheduleDataContract RetrieveSchedules();

        /// <summary>
        /// Operation for retrieving processing information for an operation
        /// </summary>
        /// <param name="request">A <see cref="RequestProcessingInstructionsDataContract"/> with the request information</param>
        /// <returns>A <see cref="ResponseProcessingInstructionsDataContract"/> with the response information</returns>
        [OperationContract(Action = "requestRetrieveProcessingInstructions", ReplyAction = "responseRetrieveProcessingInstructions", Name = "retrieveProcessingInstructions")]
        ResponseProcessingInstructionsDataContract RetrieveProcessingInstructions(RequestProcessingInstructionsDataContract request);
    }
}